<?php
import("data.db.DbAbstractTable");

class DbImageSetItem extends DbAbstractTable {
	
	public $className = "data.logic.content.ImageSetItem";
	const CLASS_NAME = "data.logic.content.ImageSetItem";
	//
	// SQL Table description section
	//
	const TB_TABLENAME	= "pd_image_set_item";
	const TB_I			= 'iseti';
	
	const TB_OBJID		= 'iseti_id_fi';
	
	public static function _get_TABLENAME() {return self::TB_TABLENAME;}
	public static function _get_ID() {return self::TB_I."_id";}
	public static function _get_SUFFIX() {return self::TB_I;}
	//
	//
	function forwardForeignCollection() {
		return array(
				"Set"=>"data.logic.content.ImageSet",
				"Image"=>"data.logic.file.FileInfo");
	}
	
	// properties

	
	public function __construct($noinit=false) {
		parent::__construct($noinit);
	}
	
	function setImageSet(&$cat) {
		$this->forwardForeigns["Set"]->setForeign($cat);
	}
	function &getImageSet() {
		return $this->forwardForeigns["Set"]->getForeign();
	}
	
	function setImage(&$cat) {
		$this->forwardForeigns["Image"]->setForeign($cat);
	}
	function &getImage() {
		return $this->forwardForeigns["Image"]->getForeign();
	}
	function getImageId() {
		return $this->forwardForeigns["Image"]->getForeignId();
	}
	
	// restore
	function fillEntity($arrResult) {
		DbAbstractTable::fillEntity($arrResult);
	}
	
	//store
	function fillFields() {
		DbAbstractTable::fillFields();
	}
	
	// same for all classes
	public static function findAll() {return DbAbstractTable::findAll(self::CLASS_NAME);}
    public static function findById($id) {return DbAbstractTable::findById($id, self::CLASS_NAME);}
}
?>